bgp (bgp-router-config)

Configures BGP router parameters

Supported in the following platforms:

Syntax

bgp [always-compare-med|bestpath|client-to-client|cluster-id|confederation|
dampening|default|deterministic-med|enable|enforce-first-as|fast-external-failover|
graceful-restart|log-neighbor-changes|neighbor|network|router-id|scan-time]
bgp [always-compare-med|deterministic-med|enable|enforce-first-as|
fast-external-failover|log-neighbor-changes]
bgp best-path [as-path [confed|ignore]|compare-router-id|med {confed {missing-as-worst}|
missing-as-worst}]
bgp client-to-client reflection
bgp cluster <IP>
bgp confederation [identifier|peers] <1-4294967295>
bgp dampening {<1-45>} {<1-20000>} <1-20000> <1-255>
bgp default [ipv4-unicast|local-preference <0-4294967295>]
bgp graceful-restart {stalepath-time <1-3600>}
bgp neighbor <IP>
bgp network import-check
bgp router-id <IP>
bgp scan-time <5-60>

Parameters

bgp [always-compare-med|deterministic-med|enable|enforce-first-as|
fast-external-failover|log-neighbor-changes]
always-compare-med Enables comparison of MEDs (Multi-exit Discriminators) received from neighbors. This option is disabled by default.

MED is a value used by BGP peers to select the best route among multiple routes. When enabled, the MED value encoded in the route is always compared when selecting the best route to the host network. A route with a lower MED value is preferred over a route with a higher MED value. BGP does not discriminate between iBGP and eBGP when using MED for route selection. This option is mutually exclusive to the deterministic-med option.

deterministic-med Enables selection of the best MED path from amongst all paths advertised by neighboring ASs. This option is disabled by default.

MED is used by BGP peers to select the best route among multiple routes. When enabled, MED route values (from the same AS) are compared to select the best route. This best route is then compared with other routes in the BGP route table to select the best overall route. This option is mutually exclusive to the always-compare-med option.

enable Starts the BGP daemon on the device (wireless controller or service platform). BGP is disabled by default.
enforce-first-as Enforces the first AS for all BGP routes. This option is disabled by default.

When enforced, devices deny updates received from an external neighbor that does not have the neighbor‘s configured AS at the beginning of the received AS path parameter. This enhances security by not allowing traffic from an unauthorized AS.

fast-external-failover Enables immediate resetting of BGP session on the interface once the BGP connection goes down. This option is enabled by default.

When enabled, a session is reset as soon as the direct link to an external peer goes down. Normally, when a BGP connection goes down, the device waits for the expiry of the duration specified in holdtime parameter before bringing down the interface.

To configure the ‘holdtime‘, use the timers > bgp > <keepalive-time> > <holdtime> command in this (BGP router) configuration mode.

log-neighbor-changes Enables logging of a BGP neighbor‘s status change (active or not active) events. It also enables the logging of the reason for such change in status.
bgp best-path [as-path [confed|ignore]|compare-router-id|med {confed {missing-as-worst}|
missing-as-worst}]
best-path Modifies the bestpath selection algorithm. The route selection algorithm uses the following criteria when selecting the preferred route: as-path, router-id, and med.
as-path [confed|ignore] Enables an AS path from being considered as a criteria for selecting the preferred route
  • confed – Enables comparison of path lengths (including confederation sets and sequences) when selecting a route (EXPERIMENTAL). This option is disabled by default.
  • ignores – Disables an AS path length from being considered as a criteria for selecting a preferred route. When, disabled the AS path length is ignored. This option is disabled by default.
compare-router-id Enables the use of router ID as a selection criteria when selecting the preferred route. When enabled, the router ID is used to select the best path between two identical BGP routes. The route with the lower router ID is selected over a route with a higher router ID. This option is disabled by default.
med {confed {missing-as-worst}| missing-as-worst} Enables comparison of AS path MED value when selecting the preferred route
MED is a value used by BGP peers to select the best route among multiple routes. When enabled, the MED value encoded in the route is always compared to determine the best route to the host network. A route with a lower MED value is preferred over a route with a higher MED value.
  • confed – Optional. Enables comparison of MED value among confederation paths (EXPERIMENTAL). When enabled, you can optionally enable the treatment of AS paths without the MED value as the least preferable route. This option is disabled by default.
  • missing-as-worst – Optional. Enables the treatment of AS paths without the MED value as the least preferable route. This option is disabled by default.
bgp client-to-client reflection
client-to-client reflection Enables client-to-client route reflection (EXPERIMENTAL)

Route reflectors are used when all iBGP speakers are not fully meshed. If the clients are fully meshed, the route-reflectors are not required. This option is enabled by default.

bgp cluster <IP>
cluster <IP> Enables and sets a cluster ID, in case the BGP cluster has more than one route-reflector

A cluster generally consists of a single route-reflector and its clients. The cluster is usually identified by the router ID of this single route-reflector. Sometimes, to increase redundancy, a cluster might have more than one route-reflector configured. In this case, all route-reflectors in the cluster are identified by the cluster ID (configured in the IP format).

bgp confederation [identifier|peers] <1-4294967295>
confederation [identifier|peers] <1-4294967295> Configures AS confederation (group of ASs) parameters (identifier and peers)
  • identifier – Enables and sets a BGP confederation identifier to allow an AS to be divided into several ASs. In other words an AS is divided into multiple ASs, and together they form a confederation. This confederation is visible to external routers as a single AS. The ASN is usually the confederation ID. Specify a value from 1 - 4294967295.
Forming AS confederation reduces iBGP mesh inside an AS.
  • peers – Configures the maximum number of the ASs constituting this BGP confederation. Specify the AS number from 1 - 4294967295. Multiple ASs can be added to the list of confederation members.
bgp dampening {<1-45>} {<1-20000>} <1-20000> <1-255>
bgp dampening {<1-45>} {<1-20000>} <1-20000> <1-255> Enables dampening and configures dampening parameters. This option is disabled by default.
Dampening minimizes the instability caused by route flapping. A penalty is added for every flap in the flapping route. As soon as the total penalty reaches the specified Route Suppress Limit value, the advertisement of this route is suppressed. This penalty is delayed when the time specified in Half Lifetime occurs. Once the penalty becomes lower than the value specified in Start Route Reuse, the advertisement of the route is un-suppressed.
  • <1-45> – Optional. Configures the half lifetime (in minutes). A penalty is imposed on a route that flaps. This is the time for the penalty to decrease to half its current value. Specify a value from 1 - 45 minutes. The default is 1 minute.
  • <1-20000> – Optional. Configures the route reuse value. When the penalty for a suppressed route decays below the value specified here, the route is un-suppressed (reused). Specify a value from 1 - 20000.
  • <1-20000> – Configures the route suppress value. When a route flaps, a penalty is added to the route. When the penalty reaches or exceeds the value specified as the ‘maximum duration to suppress a stable route‘. Specify a value from 1 - 20000.
The maximum duration to suppress a stable route, is the next set of value configured in this command from 1 - 255.
  • <1-255> – Configures the maximum duration, in minutes, a suppressed route is suppressed. This is the maximum duration for which a route remains suppressed before it is reused. Specify a value from 1 - 255 minutes.
bgp default [ipv4-unicast|local-preference <0-4294967295>]
default Configures the following defaults for BGP neighbor-related parameters: IPv4 unicast and local preference
ipv4-unicast Enable IPv4 unicast traffic for neighbors. This option is enabled by default.
local-preference <0-4294967295> Configures a local preference for the neighbor. Higher the value higher is the preference.
  • <0-4294967295> – Specify a value from 10 - 4294967295.
bgp graceful-restart {stalepath-time <1-3600>}
default graceful-restart {stalepath-time <1-3600>} Enables graceful restart on this BGP router. This option is disabled by default
  • stalepath-time <1-3600> – Optional. Configures the maximum time, in seconds, to retain stale paths from restarting neighbor. This is the time the paths from a restarting neighbor are preserved. All stale paths, unless reinstated by the neighbor after re-establishment, are deleted at the expiry of the time specified here.
    • <1-3600> – Specify a value from 1 - 3600 seconds.
bgp neighbor <IP>
neighbor <IP> Configures the BGP neighbor‘s IP address and enters its configuration mode. Use this command to configure a BGP neighbor‘s parameters.
  • <IP> – Specify the IP address in the A.B.C.D format.

For BGP neighbor configuration parameters, see bgp-neighbor-config commands.

bgp network import-check
network import-check Enables checking of the existence of BGP network route in IGP before importing
bgp router-id <IP>
router <IP> Enables the device (BGP supported wireless controller or service platform) identified by the <IP> parameter as a router. The router‘s IP address is configured as its ID, and uniquely identifies it. When not specified, the IP address of the interface is configured as the router ID. This option is disabled by default.
bgp scan-time <5-60>
scan-time <5-60> Configures the scanning interval, in seconds, for updating BGP routes. This is the interval between two consecutive scans the BGP device performs in order to validate routes in its routing table. To disable scanning, set the value to Zero (0).
  • <5-60> – Specify a value from 5 - 60 seconds. The default is 60 seconds.

Examples

nx9500-6C8809(config-profile testNX9000-router-bgp)#bgp router-id 192.168.13.13
nx9500-6C8809(config-profile testNX9000-router-bgp)#aggregate-address 116.117.118.0/24 as-set summary-only
nx9500-6C8809(config-profile testNX9000-router-bgp)#bgp neighbor 192.168.13.99
nx9500-6C8809(config-profile testNX9000-router-bgpp)#show context
 router bgp
  aggregate-address 116.117.118.0/24 as-set summary-only
  bgp router-id 192.168.13.13
  bgp neighbor 192.168.13.99
   remote-as 199
   maximum-prefix 9999 80 restart 50
nx9500-6C8809(config-profile testNX9000-router-bgp)#

Related Commands

no (bgp-router-config) Removes the BGP router parameters. The no > bgp > enable command disabled BGP.